#!/usr/bin/env python
# -*- coding: utf-8 -*-

from gm.api import set_token

from web.config.myquant_config import MyQuantConfig
from web.manager.log_manager import LogManager
from web.service.etf_info_service import EtfInfoService
from web.service.etf_transaction_data_service import EtfTransactionDataService
from web.service.macro_china_gdp_service import MacroChinaGdpService
from web.service.stock_info_service import StockInfoService
from web.service.stock_transaction_data_dall_service import StockTransactionDataAllService
from web.service.stock_transaction_data_service import StockTransactionDataService

Logger = LogManager.get_logger(__name__)


class BaseApi:
    """
    api基类
    """

    def __init__(self) -> None:
        super().__init__()

        set_token(MyQuantConfig.MyQuant_Token)

        self.stock_info_service = StockInfoService()
        self.etf_transaction_data_service = EtfTransactionDataService()
        self.etf_info_service = EtfInfoService()
        self.stock_transaction_data_service = StockTransactionDataService()
        self.stock_transaction_data_all_service = StockTransactionDataAllService()
        self.macro_china_gdp_service = MacroChinaGdpService()
